<table class="block document-item type${c.document.type_id}">
	<tr>
		<td>
			<span class="document-type">
			% if c.document.type_id > 0:
				${c.document.type.name}
				% if c.document.institution_id > 0:
					${c.document.institution.short_name}
				% endif
				% if c.document.type.has_number:
					${_('#')}${c.document.number}
				% endif
			% else:
				${_('Unknown')}
			% endif
			</span>
		</td>
		<td class="document-date">
			${_('since')} ${h.format_date(c.document.approved)}
		</td>
		<td class="document-actions" rowspan="4">
			<table class="document-actions-table">
				<tr>
					<td class="action-favorite">
						<div class="action-icon favor-status ${h.favor_class(c.document)}" id="favor-status-${c.document.id}"></div>
						<a href="${h.favor_url(c.document.id)}">${_('favorite')}</a>
					</td>
				</tr>
				<tr>
					<td class="action-edit">
						<div class="action-icon edit"></div>
						<a href="${url(controller='document', action='edit', id=c.document.id)}">${_('edit')}</a>
					</td>
				</tr>
				<tr>
					<td class="action-delete">
						<div class="action-icon icon-trash"></div>
						<a href="${url(controller='document', action='delete', id=c.document.id)}">${_('delete')}</a>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="document-title" colspan="2">
			<a class="dark-ref" href="${url(controller='document', action='view', id=c.document.id)}">${c.document.title}</a>
		</td>
	</tr>
	<tr>
		<td class="document-files" colspan="2">
			<span>${_('Files')}:</span>
			${', '.join([h.file_link(file, class_='dark-ref') for file in c.document.files])|n} 
		</td>
	</tr>
	<tr>
		<td class="document-author" colspan="2">
			<span>${_('Posted by')}:</span>
			<a class="dark-ref" href="${url.current(action='user', id=c.document.author_id)}">${c.document.author}</a>
			${h.user_online(c.document.author)}
		</td>
	</tr>
</table>